<div class="card">
  <div class="card-header">
    <h5 class="mb-0">编辑粉丝</h5>
  </div>
  <div class="card-body">
    <form method="POST" action="/mpusers/edit/<%= mpuser.id %>">
      <div class="row">
        <div class="col-md-6 mb-3">
          <label class="form-label">昵称</label>
          <input type="text" class="form-control" name="nickname" value="<%= mpuser.nickname %>" required>
        </div>
        <div class="col-md-6 mb-3">
          <label class="form-label">头像URL</label>
          <input type="text" class="form-control" name="photo" value="<%= mpuser.photo %>">
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">国家</label>
          <input type="text" class="form-control" name="country" value="<%= mpuser.country %>">
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">省份</label>
          <input type="text" class="form-control" name="province" value="<%= mpuser.province %>">
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">城市</label>
          <input type="text" class="form-control" name="city" value="<%= mpuser.city %>">
        </div>
        <div class="col-md-12 mb-3">
          <label class="form-label">签名</label>
          <textarea class="form-control" name="signature" rows="2"><%= mpuser.signature %></textarea>
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">AppId</label>
          <input type="text" class="form-control" name="appid" value="<%= mpuser.appid %>" required>
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">OpenId</label>
          <input type="text" class="form-control" name="openid" value="<%= mpuser.openid %>" required>
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">UnionId</label>
          <input type="text" class="form-control" name="unionid" value="<%= mpuser.unionid %>">
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">状态</label>
          <select class="form-select" name="status" required>
            <option value="0" <%= mpuser.status === '0' ? 'selected' : '' %>>未关注</option>
            <option value="1" <%= mpuser.status === '1' ? 'selected' : '' %>>已关注</option>
          </select>
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">用户ID</label>
          <input type="text" class="form-control" name="userid" value="<%= mpuser.userid %>">
        </div>
        <div class="col-md-4 mb-3">
          <label class="form-label">标签</label>
          <input type="text" class="form-control" name="tag" value="<%= mpuser.tag %>">
        </div>
      </div>
      <div class="d-flex justify-content-between">
        <button type="submit" class="btn btn-primary">保存</button>
        <a href="/mpusers" class="btn btn-secondary">返回</a>
      </div>
    </form>
  </div>
</div> 